/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.google.code.jmarias.common.action;

import com.google.code.jmarias.common.AbstractUser;
import com.google.code.jmarias.common.Card;
import com.google.code.jmarias.common.NewTable;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author josef
 */
@XmlRootElement
public class PickedTrumpAction extends GameAction {

    private Card trumpSuitCard;

    public PickedTrumpAction() {
    }

    public PickedTrumpAction(Card trumpSuitCard) {
        this.trumpSuitCard = trumpSuitCard;
    }

    @Override
    public void updateTable(NewTable table, AbstractUser user) {
        table.setTrump(trumpSuitCard);
    }

    @Override
    public String toString() {
        return "Volba trumfu: " + trumpSuitCard;
    }

    public Card getTrumpSuitCard() {
        return trumpSuitCard;
    }

    public void setTrumpSuitCard(Card trumpSuitCard) {
        this.trumpSuitCard = trumpSuitCard;
    }

    
}
